package com.neuedu.mp.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author jshand
 * @since 2023-03-13
 */
@TableName("ums_user")
public class UmsUser implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键 主键生成策略 ASSIGN_UUID
     */
    @TableId(type= IdType.ASSIGN_UUID)
    private String id;

    /**
     * 用户名
     */
    private String username;

    /**
     * 密码
     */
    private String password;

    @TableField("display_name")
    private String nickName;

    /**
     * 操作用户
     */
    @TableField(fill = FieldFill.INSERT )
    private String createBy;

    /**
     * 数据创建的时间
     */
    @TableField(fill = FieldFill.INSERT )
    private LocalDateTime createTime;

    /**
     * 更新用户
     */
    @TableField(fill = FieldFill.UPDATE )
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.UPDATE )
    private LocalDateTime updateTime;

    /**
     * 0 正常的，1 被删除的
     *   TableLogic 字段，默认查询的时候 会拼接字符串    where  is_delete  = 0;
     *                               执行remove方法，不会真正删除，逻辑删除（is_delete 1 ）
     */
    @TableLogic(value="0",delval = "1")
    private String isDelete;




    //不是数据库中的字段 exist = false
    @TableField(exist = false)
    public String testStr;






    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

//    public String getDisplayName() {
//        return displayName;
//    }
//
//    public void setDisplayName(String displayName) {
//        this.displayName = displayName;
//    }




    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    public String getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(String isDelete) {
        this.isDelete = isDelete;
    }

    @Override
    public String toString() {
        return "UmsUser{" +
            "id = " + id +
            ", username = " + username +
            ", password = " + password +
            ", nickName = " + nickName +
            ", createBy = " + createBy +
            ", createTime = " + createTime +
            ", updateBy = " + updateBy +
            ", updateTime = " + updateTime +
            ", isDelete = " + isDelete +
        "}";
    }
}
